#include<bits/stdc++.h>
using namespace std;
int a[200001];
int c[200001];
int main()
{
    freopen("color.in","r",stdin);
    freopen("color.out","w",stdout);
    int T,n,xt,ans;
    cin>>T;
    for(int k=0;k<T;k++)
    {
        int n;
        for(int i=0;i<n;i++)
            cin>>a[i];
        for(int j=0;j<n/2;j++)
            for(int ja=n;ja>=n/2;ja--)
            {
                int temp=0;
                if(a[j]==a[ja]&&sizeof(a)%2==1)
                {
                    cout<<1;
                    break;
                }
                else
                {
                    ans=a[temp]+a[temp+1];
                }
            }
    }
    cout<<ans<<endl;
    return 0;
}
